package com.atguigu.mybatisplus;

import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zhuzi
 */
public class XmlTest03 {


	@Data
	@XmlAccessorType(XmlAccessType.FIELD)
	@XmlRootElement(name = "person")
	public static class Person {
		@XmlAttribute
		private String id;

		@XmlElement
		private String name;

		@XmlElement
		private Integer age;

		@XmlElementWrapper(name = "notes")
		@XmlElement(name = "note")
		private List<String> notes = new ArrayList<String>();

		public Person() {

		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getId() {
			return id;
		}

		public void setId(String id) {
			this.id = id;
		}

		public Integer getAge() {
			return age;
		}

		public void setAge(Integer age) {
			this.age = age;
		}

		public List<String> getNotes() {
			return notes;
		}

		public void setNotes(List<String> notes) {
			this.notes = notes;
		}

	}
}
